import { ref } from 'vue'
const message = ref('')

export function getHouse() {
  const timeHouse = new Date().getHours()
  if (timeHouse >= 0 && timeHouse <= 6) {
    message.value = '凌晨'
  } else if (timeHouse >= 7 && timeHouse <= 11) {
    message.value = '早上'
  } else if (timeHouse >= 12 && timeHouse <= 14) {
    message.value = '中午'
  } else if (timeHouse >= 15 && timeHouse <= 18) {
    message.value = '下午'
  } else {
    message.value = '晚上'
  }
  ElNotification({
    title: '登录成功',
    message: message.value + '好',
    type: 'success'
  })
}
